package com.ebs.md.mock.centralrepo;

/**
 * Revision Author:
 *  $File: //depot/MarketData/fxmonitor/main/src/test/java/com/ebs/md/mock/centralrepo/PrecisionMock.java $
 *  $Revision: #2 $
 *  $DateTime: 2012/06/26 14:25:10 $
 *  $Change: 112066 $
 *  $Author: Arik.Sher $
 */

import java.math.BigDecimal;

import com.ebs.centralrepository.api.Precision;
import com.ebs.marketdata.dictionary.PriceContext;
import com.ebs.marketdata.dictionary.PriceContextFactory;
import com.ebs.marketdata.dictionary.Qfloat;

public class PrecisionMock
implements Precision
{
	// @see PriceContextFactory, PipTypes
	protected final static byte PIP_TYPE_NONE    = 0;
	protected final static byte PIP_TYPE_WHOLE   = 1;
	protected final static byte PIP_TYPE_HALF    = 2;
	protected final static byte PIP_TYPE_QUARTER = 3;
	protected final static byte PIP_TYPE_TENTH   = 4;
	
	protected String baseCcy;
	protected String localCcy;
	protected short  pipEndPos;
	protected byte   pipType;
	
	protected static PriceContextFactory pcf;

	static {
		pcf = new PriceContextFactory();
	}
	
	public PrecisionMock(String baseCcy, String localCcy, short pipEndPos, byte pipType) {
		super();
		this.baseCcy   = baseCcy;
		this.localCcy  = localCcy;
		this.pipEndPos = pipEndPos;
		this.pipType   = pipType;
	}

	// Locally created for easier mockuping
	public PriceContext getPriceContext() {
		boolean    negativePriceAllowed = false;
		BigDecimal scaledXPips          = null;
		
		return pcf.getPriceContext(pipEndPos-2, pipEndPos-1, pipEndPos, pipType, negativePriceAllowed, scaledXPips);
	}
	
	public String getBaseCurrencyISO() {
		return baseCcy;
	}

	public String getLocalCurrencyISO() {
		return localCcy;
	}

	public short getAutoTabPostionEBS() {
		return pipEndPos;
	}

	public short getDefaultCursorPosition() {
		throw new UnsupportedOperationException();
	}

	public int getBaseCurrencyId() {
		throw new UnsupportedOperationException();
	}



	public int getBestPriceAmount() {
		throw new UnsupportedOperationException();
	}


	public int getBestPricePlusAmount() {
		throw new UnsupportedOperationException();
	}


	public byte getBigFigureOffset() {
		throw new UnsupportedOperationException();
	}


	public short getBigFigureSize() {
		throw new UnsupportedOperationException();
	}


	public int getCurrencyPairId() {
		throw new UnsupportedOperationException();
	}


	public byte getDealableBestPipFontSizeOverride() {
		throw new UnsupportedOperationException();
	}


	public byte getDealableRegPipFontSizeOverride() {
		throw new UnsupportedOperationException();
	}


	public byte getDefaultCursorPositionOffset() {
		throw new UnsupportedOperationException();
		
	}


	public byte getDisplayAttrPipType() {
		throw new UnsupportedOperationException();
		
	}


	public byte getFXSwapAddlDecAfterPip() {
		throw new UnsupportedOperationException();
		
	}


	public int getLocalCurrencyId() {
		throw new UnsupportedOperationException();
		
	}


	public int getMaxBidThreshold() {
		throw new UnsupportedOperationException();
		
	}


	public int getMinBidThreshold() {
		throw new UnsupportedOperationException();
		
	}


	public int getMinPrimaryLaSize() {
		throw new UnsupportedOperationException();
		
	}


	public int getOutsidePriceAmount() {
		throw new UnsupportedOperationException();
		
	}


	public byte getOutsidePriceSpread() {
		throw new UnsupportedOperationException();
		
	}


	public byte getPipFontStyleOverride() {
		throw new UnsupportedOperationException();
		
	}


	public int getPipIncrementFactor() {
		throw new UnsupportedOperationException();
		
	}


	public byte getPipPadding() {
		throw new UnsupportedOperationException();
		
	}


	public byte getPipType() {
		throw new UnsupportedOperationException();
		
	}


	public byte getPipTypeOverride() {
		throw new UnsupportedOperationException();
		
	}


	public byte getPostPilotDepthOfBook() {
		throw new UnsupportedOperationException();
		
	}


	public Qfloat getPrcCheckRateDiff() {
		throw new UnsupportedOperationException();
		
	}


	public Qfloat getPrcLargeDiff() {
		throw new UnsupportedOperationException();
		
	}


	public Qfloat getPrcNormalSpread() {
		throw new UnsupportedOperationException();
		
	}


	public Qfloat getPrcWideSpread() {
		throw new UnsupportedOperationException();
		
	}


	public byte getValueDateAttributeRolloverDays() {
		throw new UnsupportedOperationException();
		
	}


	public boolean isValid() {
		throw new UnsupportedOperationException();
		
	}

}
